package cn.xfdzx.android.apps.shop.contract;

import java.util.Map;

import cn.xfdzx.android.apps.shop.base.BaseView;
import cn.xfdzx.android.apps.shop.bean.AfterSalesListMarketBean;
import cn.xfdzx.android.apps.shop.bean.AfterSalesListRetailBean;
import cn.xfdzx.android.apps.shop.bean.BaseObjectBean;
import cn.xfdzx.android.apps.shop.bean.ConfirmBeen;
import cn.xfdzx.android.apps.shop.bean.NewOrderBeen;
import cn.xfdzx.android.apps.shop.bean.OrderDetailInfoBeen;
import cn.xfdzx.android.apps.shop.bean.OrderListBeen;
import cn.xfdzx.android.apps.shop.bean.ReturnReasonBean;
import io.reactivex.Flowable;


/**
 * @author azheng
 * @date 2018/6/4.
 * Description：
 */

public interface OrderListContract {
    interface Model {
        Flowable<OrderListBeen> initData(String type, String sales_model, String page, String limit);
        Flowable<NewOrderBeen> toPay(String from, String paytype, String uni);
        Flowable<ConfirmBeen> confirm(String order_id);
        Flowable<ReturnReasonBean> getRefundRreason();
        Flowable<ReturnReasonBean> getAfterServiceRequest(Map<String, Object> param);
        Flowable<ReturnReasonBean> getReturnReason();
        Flowable<AfterSalesListRetailBean> getAfterSalesRetailList(Map<String, Object> param);
        Flowable<AfterSalesListRetailBean> getIsExceedTime(String orderId);
        Flowable<AfterSalesListMarketBean> getAfterSalesMarketList(Map<String, Object> param);
    }

    interface View extends BaseView {
        @Override
        void showLoading();

        @Override
        void hideLoading();

        @Override
        void onError(Throwable throwable);

        void onOrderListSuccess(OrderListBeen bean);

        void getRefundRreasonSuccess(ReturnReasonBean bean);

        void getAfterServiceRequestSuccess(ReturnReasonBean bean);

        void getReturnReasonSuccess(ReturnReasonBean bean);

        /**
         * 刷新完成
         */
        void finishRefresh();

        /**
         * 加载完成
         */
        void finishLoadMore();

        void onPaySuccess(NewOrderBeen bean,int position);
        void onConfirmSuccess(ConfirmBeen bean,int position);

        void onGetAfterSalesRetailListSuccess(AfterSalesListRetailBean bean);

        void onGetIsExceedTimeSuccess(AfterSalesListRetailBean bean);

        void onGetAfterSalesMarketListSuccess(AfterSalesListMarketBean bean);

    }

    interface Presenter {
        /**
         * 请求各个状态 的订单列表
         */
        void initData(boolean isRefresh, boolean isLoading, String type, String sales_model, String page, String limit);

        /**
         *
         */
        void toPay(String from, String paytype, String uni,int position);
        void confirm(String from,  int position);
        void getRefundRreason();
        void getAfterServiceRequest(Map<String, Object> param);
        void getReturnReason();
        void getAfterSalesRetailList(boolean isRefresh, boolean isLoading,Map<String, Object> param);
        void getIsExceedTime(String orderId);
        void getAfterSalesMarketList(boolean isRefresh, boolean isLoading,Map<String, Object> param);
    }
}
